<template>
  <el-select
    v-bind="item"
    :placeholder="item.placeholder || '请选择' + item.label"
    v-model="model[item.prop]"
    v-on="item.events || {}"
    :clearable="item.clearable === false ? false : true"
  >
    <el-option
      v-for="(option, index) in item.options"
      :key="index"
      :value="option[item.valueKey || 'value']"
      :label="option[item.labelKey || 'label']"
      :disabled="option[item.disabledKey]"
      v-bind="option.bind"
    >
    </el-option>
  </el-select>
</template>

<script setup>
const props = defineProps({
  item: Object,
  model: Object
})
</script>
